package org.example;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        Person p1 = new Person();
        p1.setId(1);
        p1.setName("张三");
        p1.setAge(18);
        p1.setGender("男");
        System.out.println(p1);

        Person p2 = new Person(2, "李四", 18, "男");
        System.out.println(p2);

        System.out.println(p1.equals(p2));



        //Builder模式 构造器方法，可以采用链式调用，来设置属性值
        Person p3 = Person.builder().id(3).name("王五").age(18).gender("男").build();
        System.out.println(p3.toString());
    }
}
